package entities 
{
	import org.flixel.FlxG;
	/**
	 * ...
	 * @author morgan
	 */
	public class BasicApple extends Throwable
	{
		[Embed (source = "../../data/apple.png")] private var img_apple:Class
		
		public var spinValue:Number = 0;
		
		public function BasicApple(x:int, y:int, scene:GameScene) 
		{
			super(x, y, scene);
			loadGraphic(img_apple, true, false, 16, 16);
			width = 8; height = 8;
			offset.x = 4; offset.y = 4;
			canSwitch = true;
			airStopSpeed = 70;
		}
		
		override public function update():void 
		{
			super.update();
			spinValue += velocity.x * 6 * FlxG.elapsed;
			angle = Math.floor(spinValue / 90) * 90;
		}
		
	}

}